export interface Game {
  recipes: Recipe[]
  materials: GameMaterial[]
  combos: Combo[]
  guests: GameGuest[]
  invitationGuests: InvitationGuest[]
  chefs: Chef[]
  equips: Equip[]
  decorations: Decoration[]
  quests: Quest[]
  skills: SkillElement[]
  disks: Disk[]
  ambers: Amber[]
  maps: Map[]
  condiments: CondimentElement[]
  buffs: Buff[]
  intents: Intent[]
  rules: Rule[]
  activities: Activity[]
  history: History[]
}

export interface Activity {
  id: number
  name: string
  endTime?: number
}

export interface Amber {
  amberId: number
  galleryId: string
  name: string
  type: number
  rarity: number
  desc: string
  skill: number[]
  amplification: number
  origin: AmberOrigin
}

export enum AmberOrigin {
  太初碧玉 = '太初碧玉',
  太初赤玉 = '太初赤玉',
  太初青玉 = '太初青玉',
}

export interface Buff {
  buffId: number
  conditionType: ConditionType
  conditionValue: string
  effectType: EffectType
  effectValue: number
  lastRounds: number
  desc: string
}

export enum ConditionType {
  CondimentSkill = 'CondimentSkill',
  CookSkill = 'CookSkill',
  Group = 'Group',
  Order = 'Order',
  Rank = 'Rank',
  Rarity = 'Rarity',
}

export enum EffectType {
  BasicPriceChange = 'BasicPriceChange',
  BasicPriceChangePercent = 'BasicPriceChangePercent',
  CreateBuff = 'CreateBuff',
  CreateIntent = 'CreateIntent',
  IntentAdd = 'IntentAdd',
  PriceChangePercent = 'PriceChangePercent',
  SatietyChange = 'SatietyChange',
  SetSatietyValue = 'SetSatietyValue',
}

export interface Chef {
  chefId: number
  galleryId: string
  name: string
  rarity: number
  stirfry: number
  bake: number
  boil: number
  steam: number
  fry: number
  knife: number
  skill: number
  meat: number
  fish: number
  veg: number
  creation: number
  ultimateGoal: number[]
  ultimateSkill: number
  origin: string
  tags: number[]
  sweet: number
  sour: number
  spicy: number
  salty: number
  bitter: number
  tasty: number
  disk: number
}

export interface Combo {
  recipeId: number
  recipes: number[]
}

export interface CondimentElement {
  condimentId: number
  name: string
  rarity: number
  skill: number[]
  origin: CondimentOrigin
}

export enum CondimentOrigin {
  伊尹阁 = '伊尹阁',
  庖丁阁 = '庖丁阁',
  彭铿阁 = '彭铿阁',
  易牙阁 = '易牙阁',
  梵正阁 = '梵正阁',
  膳祖阁 = '膳祖阁',
}

export interface Decoration {
  id: number
  icon: number
  name: string
  tipMin: number
  tipMax: number
  tipTime: number
  gold: number
  position: Position
  suit: string
  suitGold: number
  origin: string
}

export enum Position {
  The1大桌 = '1大桌',
  The1小桌 = '1小桌',
  The1灯 = '1灯',
  The1窗 = '1窗',
  The1装饰 = '1装饰',
  The1门 = '1门',
  The2大桌 = '2大桌',
  The2小桌 = '2小桌',
  The2屏风 = '2屏风',
  The2窗 = '2窗',
  The2装饰 = '2装饰',
  The2门 = '2门',
  The3包间 = '3包间',
  The3大桌 = '3大桌',
  The3小桌 = '3小桌',
  The3灯 = '3灯',
}

export interface Disk {
  diskId: number
  maxLevel: number
  info: number[]
}

export interface Equip {
  equipId: number
  galleryId: string
  name: string
  rarity: number
  skill: number[]
  origin: string
}

export interface GameGuest {
  name: string
  gifts: GuestGift[]
}

export interface GuestGift {
  recipe: string
  antique: GiftEnum
}

export enum GiftEnum {
  Empty = '-',
  一昧真火 = '一昧真火',
  五星炒果 = '五星炒果',
  五香果 = '五香果',
  刀嘴鹦鹉 = '刀嘴鹦鹉',
  剪刀蟹 = '剪刀蟹',
  千年煮鳖 = '千年煮鳖',
  恐怖利刃 = '恐怖利刃',
  暖石 = '暖石',
  油火虫 = '油火虫',
  烤焦的菊花 = '烤焦的菊花',
  焦虫 = '焦虫',
  神秘魔方 = '神秘魔方',
  耐煮的水草 = '耐煮的水草',
  蒸汽宝石 = '蒸汽宝石',
  蒸汽耳环 = '蒸汽耳环',
  蒸馏杯 = '蒸馏杯',
  防水的柠檬 = '防水的柠檬',
  香烤鱼排 = '香烤鱼排',
  鼓风机 = '鼓风机',
}

export interface History {
  date: string
  content: string
}

export interface Intent {
  intentId: number
  effectType: EffectType
  effectValue: number
  desc: string
  conditionType?: ConditionType
  conditionValue?: string
}

export interface InvitationGuest {
  name: string
  gifts: InvitationGuestGift[]
}

export interface InvitationGuestGift {
  recipeId: number
  gift: AmberOrigin
}

export interface Map {
  name: string
  time: number[]
  materials: MapMaterial[]
}

export interface MapMaterial {
  name: string
  skill: number
  quantity: Array<number[]>
  season: number[]
}

export interface GameMaterial {
  materialId: number
  name: string
  origin: string
}

export interface Quest {
  questId: number
  type: string
  goal: string
  rewards?: Reward[]
  conditions?: ConditionElement[]
  questIdDisp?: number
  preId?: string
}

export interface ConditionElement {
  recipeId?: number
  rank?: number
  num?: number
  goldEff?: boolean
  materialId?: number
  guest?: GuestEnum
  anyGuest?: boolean
  skill?: SkillEnum
  materialEff?: boolean
  rarity?: number
  price?: number
  category?: Category
  condiment?: CondimentEnum
  condimentEff?: boolean
}

export enum Category {
  Creation = 'creation',
  Fish = 'fish',
  Meat = 'meat',
  Veg = 'veg',
}

export enum CondimentEnum {
  Bitter = 'Bitter',
  Salty = 'Salty',
  Sour = 'Sour',
  Spicy = 'Spicy',
  Sweet = 'Sweet',
  Tasty = 'Tasty',
}

export enum GuestEnum {
  TapTap = 'TapTap',
  不良青年 = '不良青年',
  丐帮帮主 = '丐帮帮主',
  伯爵大人 = '伯爵大人',
  公主 = '公主',
  关羽 = '关羽',
  冷王只有三岁 = '冷王只有三岁',
  刘备 = '刘备',
  吕布 = '吕布',
  吕布貂蝉 = '吕布貂蝉',
  唐伯虎 = '唐伯虎',
  大内侍卫 = '大内侍卫',
  大明湖畔的美女 = '大明湖畔的美女',
  大胃王 = '大胃王',
  太上皇 = '太上皇',
  如来 = '如来',
  官爷 = '官爷',
  容嬷嬷 = '容嬷嬷',
  富二代 = '富二代',
  富人 = '富人',
  富太太 = '富太太',
  寿神 = '寿神',
  小宝 = '小宝',
  屈原 = '屈原',
  屠夫老王 = '屠夫老王',
  庞博 = '庞博',
  张飞 = '张飞',
  张飞关羽刘备 = '张飞关羽刘备',
  木优 = '木优',
  木良 = '木良',
  木良木优 = '木良木优',
  武松 = '武松',
  潇洒李白 = '潇洒李白',
  潇洒李白迷弟杜甫 = '潇洒李白迷弟杜甫',
  王子 = '王子',
  王母娘娘 = '王母娘娘',
  白富美 = '白富美',
  皇后 = '皇后',
  皇帝 = '皇帝',
  禄神 = '禄神',
  福神 = '福神',
  羌族小飒 = '羌族小飒',
  耶稣 = '耶稣',
  耶稣如来 = '耶稣如来',
  苏轼 = '苏轼',
  诸葛亮 = '诸葛亮',
  诸葛亮黄月英 = '诸葛亮黄月英',
  貂蝉 = '貂蝉',
  迷弟杜甫 = '迷弟杜甫',
  迷思吹法师 = '迷思吹法师',
  黄月英 = '黄月英',
  黑道小三 = '黑道小三',
  黑道小伊 = '黑道小伊',
}

export enum SkillEnum {
  Bake = 'bake',
  Boil = 'boil',
  Fry = 'fry',
  Knife = 'knife',
  Steam = 'steam',
  Stirfry = 'stirfry',
}

export interface Reward {
  name: string
  quantity: string
}

export interface Recipe {
  recipeId: number
  galleryId: string
  name: string
  rarity: number
  unlock: string
  stirfry: number
  boil: number
  knife: number
  fry: number
  bake: number
  steam: number
  materials: RecipeMaterial[]
  price: number
  exPrice: number
  time: number
  limit: number
  origin: string
  guests: RecipeGuest[]
  gift: GiftEnum
  condiment: CondimentEnum
  tags?: number[]
}

export interface RecipeGuest {
  guest: GuestEnum
}

export interface RecipeMaterial {
  material: number
  quantity: number
}

export interface Rule {
  Id: number
  Title: string
  Group?: number[]
  DisableCondimentEffect?: boolean
  DisableDecorationEffect?: boolean
  SatisfyRewardType?: number
  SatisfyExtraValue?: number
  SatisfyDeductValue?: number
  Satiety?: number
  GuestType?: GuestType
  IntentList?: Array<number[]>
  Hide?: boolean
  ChefNumLimit?: number
  CookbookRarityLimit?: number
  DisableCookbookRank?: boolean
  DisableChefSkillEffect?: boolean
  DisableEquipSkillEffect?: boolean
  MaterialsEffect?: MaterialsEffect[]
  DisableMultiCookbook?: boolean
  EnableChefTags?: number[]
}

export enum GuestType {
  Boss = 'Boss',
  Normal = 'Normal',
}

export interface MaterialsEffect {
  MaterialID: number
  Effect: number
}

export interface SkillElement {
  skillId: number
  desc: string
  effect: Effect[]
}

export interface Effect {
  type: string
  value: number
  condition: ConditionEnum
  cal?: Cal
  rarity?: number
  tag?: number
  conditionType?: string
  conditionValue?: number
  conditionValueList?: number[]
}

export enum Cal {
  Abs = 'Abs',
  Percent = 'Percent',
}

export enum ConditionEnum {
  Global = 'Global',
  Next = 'Next',
  Partial = 'Partial',
  Self = 'Self',
}
